﻿/*======================================*\
* Author: Vincent
* LastModifyUser: Vincent
* Description:  
* CreateTime： 2012-05
* Remark:  
\*======================================*/
using System;

using AppCode.Domain.Services;
using System.Collections.Generic;

namespace AppCode.Contract
{
    /// <summary>
    /// 数据初始化接口
    /// </summary>
    public interface ILoadDbInfoInit
    {
        /// <summary>
        /// 数据库信息初始化
        /// </summary>
        /// <returns></returns>
        void DbOnInit();

        /// <summary>
        /// 读取表字段信息
        /// </summary>
        /// <param name="tableNames"></param>
        /// <param name="excuteCount"></param>
        void OnReadTableColumnInfo(List<string> tableNames, int excuteCount);

        /// <summary>
        /// 停止读取表字段信息
        /// </summary>
        void OffReadTableColumnInfo();

        /// <summary>
        /// 检查配置
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        bool CheckConfigIsHave(string path);


        /// <summary>
        /// 加载树信息的事件
        /// </summary>
        event EventHandler<TaskInfoEventArgs> LoadTreeInfoEvent;

        /// <summary>
        /// 对UI报告信息的事件
        /// </summary>
        event EventHandler<TaskInfoEventArgs> ReportStatusMsgEvent;

        /// <summary>
        /// 报告任务进度
        /// </summary>
        event EventHandler<TaskInfoProcessEventArgs> ReportTaskProcessEvent;

        /// <summary>
        /// 任务信息写到文本
        /// </summary>
        event EventHandler<TaskInfoEventArgs> ReportTaskInfoToTextEvent;

        /// <summary>
        /// 开始生成代码
        /// </summary>
        event EventHandler BeginCreateCodeFile;
    }


}
